package cn.yunlang.zhangZhongFei.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.yunlang.zhangZhongFei.entity.UserCollect;
import cn.yunlang.zhangZhongFei.vo.request.UserCollectPageVo;
import cn.yunlang.zhangZhongFei.vo.request.UserCollectVo;
import cn.yunlang.zhangZhongFei.vo.response.R;
import org.springframework.transaction.annotation.Transactional;

/**
 * 用户收藏表 服务类
 *
 * @author ·
 * @since 2025-05-26 14:50:46
 */
public interface UserCollectService extends IService<UserCollect> {

  R<IPage<UserCollectPageVo>> pageCollect(Integer pageNo, Integer pageSize, Long userId);

  R<UserCollect> getOne(Long userCollectId);

  R<String> doCollect(UserCollectVo userCollectVo);

  @Transactional(rollbackFor = Exception.class)
  boolean add(UserCollectVo userCollectVo);

  @Transactional(rollbackFor = Exception.class)
  boolean delete(UserCollectVo userCollectVo);

  R<String> addCollect(UserCollectVo userCollectVo);

  R<String> removeCollect(UserCollectVo userCollectVo);
}
